function relaxx
global lam
clf

lam=20;
ep=1/lam
t1=1.5-log(2)
t2=t1+2.33811*ep^(4/3)

clf
% get(gcf)
set(gcf,'Position', [17 487 726 873])
subaxis(1,1,1,1,'MT',0.01,'MB',0.2,'MR',-0.02,'ML',0.038,'P',0.04)

na=100;
yc=linspace(1,2,na);
for i=1:na
	tc(i)=log(yc(i)/2)-0.5*yc(i)^2+2;
end

%  initial values
tmax=1.5-log(2)+0.1
y10=2; y20=-2/3;
y0=[y10 y20];
% calculate solution using a MATLAB routine
options = odeset('RelTol', 1e-6,'AbsTol',1e-6);
[t,y] = ode45(@rhs,[0 tmax],y0,options);

hold on
plot(tc,yc,'b','LineWidth',1.8)
plot(t,y(:,1),'--r','LineWidth',1.5)

xlabel('\tau-axis','FontWeight','bold')
ylabel('y-axis','FontWeight','bold')
grid on

box on
set(gca,'FontSize',12,'FontWeight','bold')

na=100;
tau1=1.5-log(2);
tau=linspace(tau1-0.1,tau1+0.0425,na);
for i=1:na
    tauC(i)=(tau(i)-tau1)/ep^(4/3);
	yC(i)=1-ep^(2/3)*airy(1,-tauC(i))/airy(-tauC(i));
end
plot(tau,yC,'color',[0 0.5 0],'LineWidth',1.5)

axis([0.76 0.87 -2.4 2.4])

lam=100*lam;
ep=1/lam
tmax=1.5-log(2)+0.1
y10=2; y20=-2/3;
y0=[y10 y20];
options = odeset('RelTol', 1e-10,'AbsTol',1e-10);
[tx,yx] = ode23s(@rhs,[0 tmax],y0,options);
plot(tx,yx(:,1),'--m','LineWidth',1.5)

legend({' Outer',' Numerical',' Corner',' Drop'},'Location','NorthEast')

exportgraphics(gcf,'/Users/mark/Desktop/van3.pdf')

hold off

%  define f(t,y)
function dy=rhs(t,y)
global lam
dy=zeros(2,1);
dy(1) = lam^2*(y(1)*(1-y(1)^2/3)-y(2));
dy(2) = y(1);








